package thread;

public class demo32 {
    /**
     * 有三个线程，分别只能打印A，B和C
     * 要求按顺序打印ABC，打印10次
     */
    public static void main(String[] args) {
        Thread t1 = new Thread(()->{
            System.out.print("A");
        });

        Thread t2 = new Thread(()->{
            System.out.print("B");
        });

        Thread t3 = new Thread(()->{
            System.out.println("C");
        });
        for (int i = 0; i < 10; i++) {
            t1.start();
            t2.start();
            t3.start();
        }
    }
}
